#!/usr/bin/env python
# encoding: utf-8
"""
main.py

Created by Bud Gibson on 2010-07-28.
Copyright (c) Bud Gibson 2010. Released under the Artistic/GPL License.
"""

import config
from snowball_ob import snowballer
from reporter import get_sample
import datetime

try: #buzztracker package is on system path
  import buzztracker.utilities.dj as dj
except ImportError: #buzztracker package is not on system path
  import sys
  import os
  sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
  
import buzztracker.utilities.dj as dj

def main():
  snowballer(2)
  participants = get_sample(2)
  print len([p for p in participants if p.public == True])
  print len([p for p in participants if p.count_ties > 200])
  print len([p for p in participants if p.count_ties < 100 and p.public == True])
  print len([p for p in participants if p.count_ties < 50 and p.public == True])
  print len(participants)
  struct = {
    'dateRun': datetime.datetime.now(),
    'participants': get_sample(2)
    }
  dj.run(struct, output_file='output/participantNetworks.html')


if __name__ == '__main__':
	main()
